package org.estela.classifiers;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

/**
 * 
 * @version $Revision$
 * @date Apr 23, 2006
 * @author <a href="mailto:akantek@nyse.com">Antonio Kantek</a>
 */
public class ClassifierInfo implements Externalizable {
	private static final long serialVersionUID = 1L;
	
	/** Classifier full name */
	private String name;

	/** A classifier description */
	private String description;
	
	/** The tooltip text */
	private String toolTip;

	private String type; 
	
	/**
	 * Default constructor.
	 */
	public ClassifierInfo() {
	}
	
	public ClassifierInfo(String name, String description, String toolTip, String type) {
		this.name = name;
		this.description = description;
		this.toolTip = toolTip;
		this.type = type;
	}

	/**
	 * @return Returns the description.
	 */
	public String getDescription() {
		return this.description;
	}

	/**
	 * @return Returns the toolTip.
	 */
	public String getToolTip() {
		return this.toolTip;
	}

	/**
	 * @return Returns the name.
	 */
	public String getName() {
		return name;
	}

	/*
	 *  (non-Javadoc)
	 * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
	 */
	public void writeExternal(ObjectOutput out) throws IOException {
		out.writeUTF(this.name);
		out.writeUTF(this.description);
		out.writeUTF(this.toolTip);
		out.writeUTF(this.type);
	}

	/*
	 *  (non-Javadoc)
	 * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
	 */
	public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
		this.name = in.readUTF();
		this.description = in.readUTF();
		this.toolTip = in.readUTF();
		this.type = in.readUTF();
	}

	/**
	 * @return Returns the type.
	 */
	public String getType() {
		return type;
	}


}
